import { axiosInstance } from 'src/boot/axios'
import CommonConfig from 'src/assets/js/config'
const baseUrl = CommonConfig.reportUrl + '/v1'

/**
 * 导出报表excel[盛驰工单]
 * @param data
 * @returns {Promise<unknown>}
 */
function getExport (data) {
  const url = `${baseUrl}/third_work_order/excel:export`

  return axiosInstance.post(url, data).then(res => {
    return Promise.resolve(res)
  })
}

/**
 * 获取报表[盛驰工单]
 * @param params
 * @returns {Promise<unknown>}
 */
function getReportList (params) {
  const url = `${baseUrl}/third_work_order/get`

  return axiosInstance.post(url, params).then(res => {
    return Promise.resolve(res.data)
  })
}
export default {
  getExport,
  getReportList
}
